package com.threefivework.mymall.wechat.response;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.threefivework.mymall.annotation.Required;
import com.threefivework.mymall.model.domain.CDATAConvert;
import com.threefivework.mymall.wechat.common.BaseDTO;
import lombok.Data;

/**
 * descripiton:
 *
 * @author: kinson(2219945910@qq.com)
 * @date: 2018/7/4
 * @time: 22:44
 * @modifier:
 * @since:
 */
@Data
@XStreamAlias("xml")
public class PaymentNotifyResponse extends BaseDTO {

    @XStreamAlias("bank_type")
    private String bankType;

    /**
     * 接口链接网关
     */
    @XStreamAlias("cash_fee")
    private String cashFee;

    /**
     * 设备号
     */
    @XStreamAlias("device_info")
    private String deviceInfo;

    /**
     * 签名类型
     */
    @XStreamAlias("sign_type")
    private String signType;

    /**
     * 商品描述
     */
    @XStreamAlias("is_subscribe")
    private String isSubscribe;

    /**
     * 商品详情
     */
    @XStreamAlias("open_id")
    @XStreamConverter(CDATAConvert.class)
    private String openId;

    /**
     * 附加数据
     */
    @XStreamAlias("result_code")
    private String resultCode;

    /**
     * 商城订单号
     */
    @Required
    @XStreamAlias("out_trade_no")
    private String outTradeNo;

    /**
     * 币种
     */
    @XStreamAlias("fee_type")
    private String feeType;

    /**
     * 交易金额（为分）例如12.53 应该（12.53*100） 放入当前值
     */
    @Required
    @XStreamAlias("total_fee")
    private int totalFee;

    @Required
    @XStreamAlias("return_code")
    private String returnCode;

    /**
     * 交易起始时间yyyyMMddHHmmss
     */
    @XStreamAlias("transaction_id")
    private String transactionId;

    /**
     * 交易结束时间
     */
    @XStreamAlias("time_end")
    private String timeEnd;

    /**
     * 支付交易类型
     */
    @Required
    @XStreamAlias("trade_type")
    private String tradeType;
}
